package com.jxd.project.travel.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jxd.project.travel.model.Ticket;
import com.jxd.project.travel.model.Travel;

import java.util.List;

public interface ITravelService extends IService<Travel> {
    IPage<Travel> getTravelList(int pageNum, int pageSize, String travelId, String startTime, String endTime, int empno);

    int insertTravel(Travel travel);
    boolean updateTravel(Travel travel);
    boolean deleteTravel(List<String> travelIds);

    //修改差旅信息时获取差旅信息
    Travel getOne(String travelId);

    String moneyToChinese(double money);

    //部门经理和总经理看到本部门的待审核差旅信息，总经理看到所有部门的待审核差旅信息
    IPage<Travel> getTravelListByEmpno(int pageNum, int pageSize, int empno ,int[] roleids, boolean isAll);

    //查询该差旅绑定的车票信息
    List<Ticket> getTicketByTravelId(String travelId);

    //更新审核状态（通过）
    boolean updateApprovalStatus1(String travelId, String managerOpinion, String directorOpinion);
    //更新审核状态（驳回）
    boolean updateApprovalStatus2(String travelId, String managerOpinion, String directorOpinion);

    //查询差旅审核状态
    int getApprovalByTravelId(String travelId);

    //查询驳回数量
    int getRejectCount(int empno);

}
